import { STORAGE_USER_INFO } from '@/static/js/constants/storage';
import { STORE_COUNTER_NAME } from '@/static/js/constants/store';
import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useCounter = defineStore(STORE_COUNTER_NAME, () => {
  const count = ref(0);

  function increment() {
    count.value++;
  }

  function setCount(value: number) {
    count.value = value;
  }

  return { count, increment, setCount };
});
